// package hn.cch.configuration;
//
// import org.springframework.context.annotation.Bean;
// import org.springframework.context.annotation.Configuration;
// import org.springframework.scheduling.annotation.EnableScheduling;
// import org.springframework.scheduling.annotation.SchedulingConfigurer;
// import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
// import org.springframework.scheduling.config.ScheduledTaskRegistrar;
//
// import java.util.concurrent.Executor;
//
// @EnableScheduling
// @Configuration
// public class SchedulingConfiguration implements SchedulingConfigurer {
//
//     @Bean(value = "threadPoolTaskScheduler")
//     public Executor threadPoolTaskScheduler() {
//         ThreadPoolTaskScheduler threadPoolTaskScheduler = new ThreadPoolTaskScheduler();
//         threadPoolTaskScheduler.setThreadNamePrefix("Scheduler-");
//         threadPoolTaskScheduler.setPoolSize(2);
//         return threadPoolTaskScheduler;
//     }
//
//     @Override
//     public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
//         scheduledTaskRegistrar.setScheduler(threadPoolTaskScheduler());
//     }
// }
